<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        width: 100px;
        height: 100px;
        background-color: black;
      }
    </style>
  </head>

  <body>
    <button>变色</button>
    <hr />
    <div></div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <!-- 只需要导入即可支持，无需任何改动 -->
    <script src="./node_modules/@regru/jquery-color/jquery.color.js"></script>
    <script>
      $(function () {
        $('button').on('click', function () {
          $('div').animate({ 'background-color': 'red', width: 200 }, 2000, function () {
            alert('动画结束')
          })
        })
      })
    </script>
  </body>
</html>
